<?php
global $CONFIG;

$tab = $vars['tab'];

$interestselect = '';
$reported_interest_select = '';
$commentselect = '';
$reported_comment_select = '';
$helpselect = '';
switch ($tab) {
    case 'interests':
        $interestselect = 'class="selected"';
        break;
    case 'reportedinterests':
        $reported_interest_select = 'class="selected"';
        break;
    case 'comments':
        $commentselect = 'class="selected"';
        break;
    case 'reportedcomments':
        $reported_comment_select = 'class="selected"';
        break;
    default:
        $helpselect = 'class="selected"';
        break;
}
?>
<div class="contentWrapper">
    <div id="elgg_horizontal_tabbed_nav">
        <ul>
            <li <?php echo $interestselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/greengar/opinions/moderation/pages/admin.php?tab=interests'; ?>"><?php echo 'Interests'; ?></a></li>
            <li <?php echo $reported_interest_select; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/greengar/opinions/moderation/pages/admin.php?tab=reportedinterests'; ?>"><?php echo 'Reported Interests'; ?></a></li>
            <li <?php echo $commentselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/greengar/opinions/moderation/pages/admin.php?tab=comments'; ?>"><?php echo 'Comments'; ?></a></li>
            <li <?php echo $reported_comment_select; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/greengar/opinions/moderation/pages/admin.php?tab=reportedcomments'; ?>"><?php echo 'Reported Comments'; ?></a></li>
            <li <?php echo $helpselect; ?>><a href="<?php echo $CONFIG->wwwroot . 'mod/greengar/opinions/moderation/pages/admin.php?tab=help'; ?>"><?php echo 'Help'; ?></a></li>
        </ul>
    </div>
<?php
switch ($tab) {
    case 'interests':
        echo elgg_view("opinions/admin/interests");
        break;
    case 'reportedinterests':
        echo elgg_view("opinions/admin/reported_interests");
        break;
    case 'comments':
        echo elgg_view("opinions/admin/comments");
        break;
    case 'reportedcomments':
        echo elgg_view("opinions/admin/reported_comments");
        break;
    default:
        echo elgg_view("opinions/admin/help");
        break;
}
?>
</div>
